<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>事件</title>
	<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
	<script type="text/javascript">
		$(function(){
		    $('#div1').bind('click keydown keypress', function(event) {
		  
		        console.log($(this).html());
		    });

		    // $('#div1').click(function(event) {
		    // 	/* Act on the event */
		    // 	console.log(event);
		    // 	console.log(event.clientX);
		    // });
		    $(document).click(function(event) {
		    	console.log(event.clientX);
		    });
		    $(document).contextmenu(function(event) {
			    // event.preventDefault();
			    console.log(event.clientY);
			    return false;
			});

		});

	</script>

	<style type="text/css">
		.box{
			width: 200px;
			height: 200px;
			background-color: gold;
			margin: 30px auto 0;
		}

	</style>
</head>
<body>
	<div class="box" id="div1">这是一个DIV元素!</div>
</body>
</html>